/*
 * @Descripttion: GGB
 * @version: 1.0
 * @Author: GGB
 * @Date: 2021-08-17 11:15:15
 * @LastEditors: GGB
 * @LastEditTime: 2021-08-18 06:48:48
 */
import 'package:flutter/material.dart';
import 'package:flutter_data_center/components/animation_text.dart';
import 'package:flutter_data_center/controller/door_controller.dart';
import 'package:flutter_data_center/utills/color_utils.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart';

import '../../../../constants.dart';

class DoorStatistics extends StatelessWidget {
  const DoorStatistics({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) => GetBuilder<DoorController>(
        builder: (_controller) => Row(
          children: [
            Container(
              padding: EdgeInsets.all(defaultPadding),
              width: 83,
              height: 83,
              decoration: BoxDecoration(
                color: Theme.of(context).primaryColor,
                borderRadius: BorderRadius.circular(15),
              ),
              child: SvgPicture.asset(
                "assets/icon/icon_door.svg",
                color: gColor("#333333"),
              ),
            ),
            SizedBox(width: 20),
            Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Text(
                  "门禁管理",
                  style: TextStyle(
                    fontSize: 24,
                    fontWeight: FontWeight.w500,
                    color: gColor("#333333"),
                  ),
                ),
                SizedBox(height: 7),
                AnimText(
                  number: _controller.total,
                  style: TextStyle(
                    fontSize: 32,
                    fontWeight: FontWeight.w500,
                    color: Theme.of(context).primaryColor,
                  ),
                ),
              ],
            ),
          ],
        ),
      );
}
